home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / heaptrk.zip / TIMES.PAS < prev   
Pascal/Delphi Source File  |  1993-01-04  |  386b  |  29 lines

  1. Unit Times;
  2.  
  3. Interface
  4.  
  5.   Uses Dos;
  6. Function Time : String;
  7.  
  8. Implementation
  9.  
  10. Function Time : String;
  11. Var
  12.   HR,MN,SC,HN : Word;
  13.   HRS,MNS,SCS : String[2];
  14.  
  15. Begin
  16.  
  17.   GetTime(HR,MN,SC,HN);
  18.   Str(HR:2,HRS);
  19.   STR(MN:2,MNS);
  20.   If MNS[1] = ' ' then MNS[1] := '0';
  21.   STR(SC:2,SCS);
  22.   If SCS[1] = ' ' then SCS[1] := '0';
  23.  
  24.   Time := HRS+':'+MNS+':'+SCS;
  25.  
  26. End;
  27.  
  28. End.
  29.